package com.cfpl.project_common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 全局异常返回状态枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {
    //正常
    SUCCESS(200,"OK"),
    SYSTEM_ERROR(500,"系统异常"),
    PARAMETER_ERROR(601,"参数异常"),
    USER_INFO_ERROR(602,"用户信息异常"),
    USER_NONEXISTENT_ERROR(603,"用户不存在"),
    USER_NOT_LOGIN(401, "用户未登录"),
    INSUFFICIENT_PERMISSION_ERROR(403,"权限不足"),
    REGISTER_CHECK_CODE_ERROR(607,"验证码错误"),
    REGISTER_REPEAT_USERNAME_ERROR(608,"用户名已注册"),
    REGISTER_REPEAT_PHONE_ERROR(609,"手机号已注册"),
    USERNAME_OR_PASSWORD_ERROR(610,"用户名或密码错误"),
    USER_STATUS_ERROR(612,"用户状态异常,请联系管理员"),
    VERIFY_TOKEN_ERROR(611,"令牌解析异常"),
    QR_CODE_ERROR(612,"二维码生成错误"),
    INSUFFICIENT_STOCK_ERROR(614,"库存不足"),
    REGISTER_EMAIL_FORMAT_ERROR(1001,"邮箱格式错误"),
    REGISTER_PHONE_FORMAT_ERROR(1002,"手机号格式错误"),
    REGISTER_PASSWORD_FORMAT_ERROR(1003,"密码格式错误"),
    PERMISSION_IS_USING(3001,"权限正在使用中"),
    ROLE_IS_USING(3000,"角色正在使用中");



    private final Integer code;

    private final String message;


}
